
import VueRouter from 'vue-router'

// 登录页
import Login from '@pages/Login'
import Home from '@pages/Home'

// 路由配置
const routes = [
  {
    path: '/',
    redirect: {
      name: 'home'
    }
  },
  {
    name: 'home',
    path: '/home',
    component: Home,
    meta: {
      title: '首页',
      frameLayout: 'Main'
    }
  },
  {
    path: '/login',
    component: Login,
    meta: {
      title: '登录页',
      frameLayout: 'Login'
    }
  },
  {
    path: '*',
    component: {
      template: '<div>404</div>'
    }
  }
]

// 路由
const router = new VueRouter({
  routes
})

export default router
